Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADD] add transformer_int4_fp16_loadlowbit_gpu_win api #11511

Merged

Conversation

ACupofAir
Copy link
Contributor

Description

  • Add transformer_int4_fp16_loadlowbit_gpu_win api for igpu-perf use

Copy link
Contributor

@Oscilloscope98 Oscilloscope98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Oscilloscope98
Copy link
Contributor

model = AutoModelForCausalLM.load_low_bit(model_path+'-'+low_bit, optimize_model=True, trust_remote_code=True,
torch_dtype=torch.float16, use_cache=True, cpu_embedding=cpu_embedding).eval()
tokenizer = AutoTokenizer.from_pretrained(model_path+'-'+low_bit, trust_remote_code=True)
model = model.to('xpu')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use model = model.half().to('xpu'), and remove torch_dtype=torch.float16 for run_transformer_int4_fp16_loadlowbit_gpu_win for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Oscilloscope98 Oscilloscope98 changed the title [ADD] add transformer_int4_fp16_loadlowbit_gpu_win api [ADD] add transformer_int4_fp16_loadlowbit_gpu_win api Jul 5, 2024
@Oscilloscope98 Oscilloscope98 merged commit 1efb6eb into intel-analytics:main Jul 5, 2024
1 check passed
RyuKosei pushed a commit to RyuKosei/ipex-llm that referenced this pull request Jul 19, 2024
…tics#11511)

* [ADD] add transformer_int4_fp16_loadlowbit_gpu_win api

* [UPDATE] add int4_fp16_lowbit config and description

* [FIX] fix run.py mistake

* [FIX] fix run.py mistake

* [FIX] fix indent; change dtype=float16 to model.half()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants